package com.songlanyun.modules.marketing.groupbuy.controller.api;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.songlanyun.common.enums.MarketingConstant;
import com.songlanyun.common.exception.RRException;
import com.songlanyun.common.utils.BeanUtil;
import com.songlanyun.common.utils.PageUtils;
import com.songlanyun.common.utils.R;
import com.songlanyun.common.validator.ValidatorUtils;
import com.songlanyun.modules.exception.MarketingException;
import com.songlanyun.modules.marketing.groupbuy.entity.GroupBuyActivity;
import com.songlanyun.modules.marketing.groupbuy.model.dto.GroupBuyActivityDTO;
import com.songlanyun.modules.marketing.groupbuy.model.vo.GroupBuyActivityGoodsVO;
import com.songlanyun.modules.marketing.groupbuy.service.GroupBuyActivityService;
import com.songlanyun.modules.marketing.seckill.entity.SeckillActivity;
import com.songlanyun.modules.marketing.seckill.model.vo.SeckillActivityGoodsVO;
import com.songlanyun.modules.user.controller.AbstractController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.Date;
import java.util.List;
import java.util.Map;


/**
 * 拼团活动
 *
 * @author Mark
 * @email sunlightcs@gmail.com
 * @date 2020-11-27 14:03:39
 */
@RestController
@RequestMapping("api/groupbuy/activity")
public class GroupBuyActivityApiController extends AbstractController {
    @Autowired
    private GroupBuyActivityService groupBuyActivityService;



    /**
     * 查询团的详情信息
     */
    @GetMapping("/info/{id}")
//    @RequiresPermissions("seckill:seckillActivity:info")
    public R info(@PathVariable("id") Long id) {
        GroupBuyActivity groupBuyActivity = groupBuyActivityService.getById(id, true);
        return R.ok().put("data", groupBuyActivity);
    }

}
